package com.ctgu.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 
 * @TableName t_shops
 */
@TableName(value ="t_shops")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ShopsEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "`name`")
    private String name;

    @TableField(value = "type_id")
    private Integer typeId;

    @TableField(value = "lng")
    private Double lng;

    @TableField(value = "lat")
    private Double lat;

    @TableField(exist = false)  // 该字段不会映射到数据库中的字段
    private Double distance;    // 表示当前用户到该商户的距离

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}